package service

import (
	"google.golang.org/grpc"
	"log"
	pb "user-web/user"
)

const (
	Address = "localhost:5000"
)

var UserService pb.UserServiceClient

func InitClient() {
	conn, err := grpc.Dial(Address, grpc.WithInsecure(), grpc.WithBlock())
	if err != nil {
		log.Fatalf("did not connect: %v", err)
		panic(err)
	}
	UserService = pb.NewUserServiceClient(conn)
	log.Println("tcp_client startup")
}
